//
//  ERClassType.h
//  metadata
//
//  Created by easy on 11-5-30.
//  Copyright 2011 zeasy@qq.com. All rights reserved.
//
#include "ERuntime.h"

@interface ERClassType : NSObject {
	NSString *type;
	NSUInteger size;
	NSUInteger alignment;
}
@property (nonatomic, readonly) NSString *type;				//类型描述
@property (nonatomic, readonly) NSUInteger size;			//类型大小
@property (nonatomic, readonly) NSUInteger alignment;		//类型对齐数

-(id) initWithType:(NSString *) aType;

+(id) typeWithCString:(const char *)aType;
+(id) typeWithEncode:(const char *)encode;                      //@encode
+(id) erClassType:(ERClass *)aClazz;
+(id) classType:(Class) aClazz;
+(id) intClassType;
+(id) boolClassType;
+(id) charClassType;
+(id) shortClassType;
+(id) longClassType;
+(id) floatClassType;
+(id) doubleClassType;


-(BOOL) isUnkown;								// '?'
-(BOOL) isObject;								// '@'
-(BOOL) isEncode:(const char *)encode;
-(BOOL) isInt;									// 'i'
-(BOOL) isBool;									// 'c'
-(BOOL) isChar;
-(BOOL) isShort;
-(BOOL) isLong;
-(BOOL) isFloat;
-(BOOL) isDouble;
-(BOOL) isVoid;
-(BOOL) isPointer;
@end
